<template>
	<view class="searchBg" :style="{backgroundColor:bgColor}">
		<view class="searchMain" :style="{borderRadius:borderR+'rpx'}" @click="bindClick">
			<uni-icons class="searchicon" type="search" color="#6e6e6e" size="24"></uni-icons>
			搜索
		</view>
	</view>
</template>

<script>
	export default{
		data(){
			return {
				
			}
		},
		props:{
			bgColor:{
				type: String,
				default: '#c00000'
			},
			// 单位是rpx
			borderR:{
				type: Number,
				default: 80,
			}
		},
		
		methods:{
			bindClick(){
				this.$emit('click')
			}
		}
	}
</script>

<style lang="scss">
	.searchBg{
		height: 100rpx;
		padding: 20rpx 30rpx;
		display: flex;
		justify-content: center;
		align-items: center;
		box-sizing: border-box;
		.searchMain{
			background: #fff;
			width: 100%;
			height: 100%;
			display: flex;
			flex-direction: row;
			justify-content: center;
			align-items: center;
			font-size: 24rpx;
			color: #6e6e6e;
		}
	}
</style>